record class · System

Tuple<T1, T2>

public record class Tuple<T1, T2> : IToString, IHashable<Tuple<T1, T2>>

2 items in an object: Item1…Item2, fixed when it is made.

Kind
record class
Namespace
System
Assembly
System.Core
Access
public, record
Source file
Tuples.ant

Type parameters

NameConstraints
T1any type
T2any type

Inheritance

Base classes
Any Tuple<T1, T2>
Interfaces
IToString IHashable<TSelf>

Constructors

new(T1 Item1, T2 Item2)
#

Methods

ToValueTuple() : (T1, T2)
#

The same items in a ValueTuple.

override ToString() : str
#

override

override Hash() : u64
#

override

Equals(Tuple<T1, T2> other) : bool
#

Fields

readonly T1 Item1
#
readonly T2 Item2
#

Inherited members (3)

Source

Tuple<T1, T2> as Antril, decompiled from its Larva HIR.

System.Tuple`2.ant
// System.Tuple — System.Core (decompiled from Larva HIR)

into namespace System
{
	/// 2 items in an object: Item1…Item2, fixed when it is made.
	public record class Tuple<T1, T2> : IToString, IHashable<Tuple<T1, T2>>
	{
		public:
			readonly T1 Item1;
			readonly T2 Item2;

			new(T1 Item1, T2 Item2)
			{
				this.Item1 = Item1;
				this.Item2 = Item2;
			}

			/// The same items in a ValueTuple.
			ToValueTuple() : (T1, T2) => (Item1, Item2);
	}
}
Esc